﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="BankAccount.ascx.cs" Inherits="TCKQKL.FrontEnd.Web.Controls.BankAccount" %>
<link href="../styles/data.css" rel="stylesheet" type="text/css" />
<%@ Import Namespace="TCKQKL.FrontEnd.DataModel" %>
<%@ Import Namespace="TCKQKL.FrontEnd.Config" %>
<table class="data" style="border:none;">
    <% if (banks != null)
           if (banks.Count > 0)
           {%>
    <tr>
        <td class="OrderAlertMessageStyle" colspan="7">
            <img alt="money" "width: 40px; height: 40px;" src="./Images/money.gif" style="width: 28px; height: 28px" />TÀI KHOẢN TIỀN
            &nbsp;
        </td>
    </tr>
    <tr>
        <th class="InnerHeading">
            Account         </th>
        <th class="InnerHeading">
            Bank Name         </th>
        <th class="InnerHeading">
            Trading Qtty
        </th>
        <th class="InnerHeading">
            Netting Qtty
        </th>
        <th class="InnerHeading">
            Locked Qtty
        </th>
        <th class="InnerHeading">
            Total Amount</th>
        <th class="InnerHeading">
            Last updated
        </th>
    </tr>
    <%for (int i = 0; i < banks.Count; i++)
      { %>
    <tr>
        <td class="InnerData">
            <%=banks[i].bankAccount%>
        </td>
        <td class="InnerData">
            <%=banks[i].bankName%>
        </td>
        <td class="InnerData">
            <%=((banks[i].tradingAmount) < 0) ? "<span style=\"color: red;\">" + String.Format("{0:0,0}", banks[i].tradingAmount) + "</span>" : "<span style=\"color: green;\">" + String.Format("{0:0,0}", banks[i].tradingAmount) + "</span>"%>
        </td>
        <td class="InnerData">
            <%=String.Format("{0:0,0}", banks[i].nettingAmount)%>
        </td>
        <td class="InnerData">
            <%=String.Format("{0:0,0}", banks[i].blockAmount)%>
        </td>
        <td class="Master" style="text-align: right">
        <%=((banks[i].tradingAmount + banks[i].nettingAmount) < 0) ? "<span style=\"color: red;\">" + String.Format("{0:0,0}", banks[i].tradingAmount + banks[i].nettingAmount) + "</span>" : "<span style=\"color: green;\">" + String.Format("{0:0,0}", banks[i].tradingAmount + banks[i].nettingAmount) + "</span>"%>
        </td>
        <td class="InnerData" style="text-align: right">
            <%=banks[i].lastModified.ToString("dd/MM/yyyy")%>
        </td>
    </tr>
    <%}%>
    <%}%>
</table>
